package com.oba.king.businessprocess.storagemanage.instorage;

import java.io.Serializable;

import com.oba.base.service.BaseBo;
import com.oba.king.datalib.productinfo.ProductInfo;

public class InStoragePrdt extends BaseBo implements Serializable {
	
	private InStorage inStorage;//入库单号
	private ProductInfo productInfo;//药品id
	private Long inAmount;//药品数量
	private String measureUnit;//药品单位
	private Double unitPrice;//药品价格
	private Double totalSum;//总金额
	
	public Long getId() {
		return productInfo.getId();
	}

	public String getName() {
		return null;
	}
	
	public boolean equals(Object obj) {
		if(!(obj instanceof InStoragePrdt)) {
			return false;
		}
		InStoragePrdt ipl = (InStoragePrdt) obj;
		if(this.inStorage.getInStorageId() == null || this.productInfo.getProductId() == null || ipl.inStorage.getInStorageId() == null || ipl.productInfo.getProductId() == null) {
			return false;
		} else if(this.inStorage.getInStorageId().equals(ipl.inStorage.getInStorageId()) && this.productInfo.getProductId().equals(ipl.productInfo.getProductId())) {
			return true;
		} else {
			return false;
		}
	}

	public Long getInAmount() {
		return inAmount;
	}

	public void setInAmount(Long inAmount) {
		this.inAmount = inAmount;
	}

	public String getMeasureUnit() {
		return measureUnit;
	}

	public void setMeasureUnit(String measureUnit) {
		this.measureUnit = measureUnit;
	}

	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Double getTotalSum() {
		return totalSum;
	}

	public void setTotalSum(Double totalSum) {
		this.totalSum = totalSum;
	}

	public ProductInfo getProductInfo() {
		return productInfo;
	}

	public void setProductInfo(ProductInfo productInfo) {
		this.productInfo = productInfo;
	}

	public InStorage getInStorage() {
		return inStorage;
	}

	public void setInStorage(InStorage inStorage) {
		this.inStorage = inStorage;
	} 
}
